﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Gurucore.Framework.DataAccess;

namespace Gurucore.DTOGenerator.DTO
{
	[MappedTable(TableName = "INFORMATION_SCHEMA.KEY_COLUMN_USAGE", AllowTablePrefix = false, Updatable = false)]
	public class KeyColumnUsage : DTOBase
	{
		public const string CONSTRAINT_NAME = "CONSTRAINT_NAME";
		public const string TABLE_SCHEMA = "TABLE_SCHEMA";
		public const string TABLE_NAME = "TABLE_NAME";
		public const string COLUMN_NAME = "COLUMN_NAME";
		public const string REFERENCED_TABLE_SCHEMA = "REFERENCED_TABLE_SCHEMA";
		public const string REFERENCED_TABLE_NAME = "REFERENCED_TABLE_NAME";
		public const string REFERENCED_COLUMN_NAME = "REFERENCED_COLUMN_NAME";

		private string m_sConstraintName;

		[MappedColumn(ColumnName = CONSTRAINT_NAME)]
		public virtual string ConstraintName
		{
			get { return m_sConstraintName; }
			set { m_sConstraintName = value; }
		}

		private string m_sTableSchema;

		[MappedColumn(ColumnName = TABLE_SCHEMA)]
		public virtual string TableSchema
		{
			get { return m_sTableSchema; }
			set { m_sTableSchema = value; }
		}

		private string m_sTableName;

		[MappedColumn(ColumnName = TABLE_NAME)]
		public virtual string TableName
		{
			get { return m_sTableName; }
			set { m_sTableName = value; }
		}

		private string m_sColumnName;

		[MappedColumn(ColumnName = COLUMN_NAME)]
		public virtual string ColumnName
		{
			get { return m_sColumnName; }
			set { m_sColumnName = value; }
		}

		private string m_sReferencedTableSchema;

		[MappedColumn(ColumnName = REFERENCED_TABLE_SCHEMA)]
		public virtual string ReferencedTableSchema
		{
			get { return m_sReferencedTableSchema; }
			set { m_sReferencedTableSchema = value; }
		}

		private string m_sReferencedTableName;

		[MappedColumn(ColumnName = REFERENCED_TABLE_NAME)]
		public virtual string ReferencedTableName
		{
			get { return m_sReferencedTableName; }
			set { m_sReferencedTableName = value; }
		}

		private string m_sReferencedColumnName;

		[MappedColumn(ColumnName = REFERENCED_COLUMN_NAME)]
		public virtual string ReferencedColumnName
		{
			get { return m_sReferencedColumnName; }
			set { m_sReferencedColumnName = value; }
		}
	}
}
